package com.example.test.config;

import io.minio.MinioClient;
import io.minio.errors.InvalidEndpointException;
import io.minio.errors.InvalidPortException;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class MinioServerConfig {

    private static String url = "http://47.102.193.187:9000";  //minio服务的IP端口
    private static String accessKey = "admin";
    private static String secretKey = "admin123";

    @Bean
    public MinioClient getMinioClient() throws InvalidPortException, InvalidEndpointException {
        return  new MinioClient(url, accessKey, secretKey);
    }

}
